/**
 * 
 */
package com.iwords.service.ao.impl;

import com.iwords.service.object.UserEntity;
import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import com.iwords.service.TeacherService;
import com.iwords.service.object.TeacherEntity;
import com.iwords.service.persistence.TeacherPersistence;

/**
 * @author    	huangbaichuan 
 * @time      	2011-8-14    
 * @description	老师-service
 */
@Stateless
public class TeacherServiceImpl implements TeacherService{

	@EJB
	TeacherPersistence teacherPersistence;
	public void create(TeacherEntity teacher) {
		teacherPersistence.create(teacher);
		
	}

 
	public void edit(TeacherEntity teacher) {
		teacherPersistence.edit(teacher);
		
	}

	public TeacherEntity findUser(TeacherEntity teacher) {
		 
		return teacherPersistence.findUser(teacher);
	}

	public void remove(TeacherEntity teacher) {
		teacherPersistence.remove(teacher);
		
	}
	public TeacherEntity find(Object id) {
		 
		return teacherPersistence.find(id);
	}

	public boolean isContain(TeacherEntity entity) {
	 
		return teacherPersistence.isContain(entity);
	}

	public List<TeacherEntity> findAll() {
		return teacherPersistence.findAll();
	}

	public List<TeacherEntity> findRange(int[] range) {
		return teacherPersistence.findRange(range);
	}

	public int count() {
		return teacherPersistence.count();
	}

    @Override
    public TeacherEntity findByTeachername(String teachername) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public List<UserEntity> findStudentsByTeacherid(Long teacherid) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public TeacherEntity findTeacherByMarktingID(TeacherEntity teacher) {
        return this.teacherPersistence.findTeacherByMarktingID(teacher);
    }
    
    

}
